package com.blacksheep.mtm.dao;

import com.blacksheep.mtm.pojo.manager.TbMedicine;
import com.blacksheep.mtm.pojo.manager.TbMedicineExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface TbMedicineMapper {
    long countByExample(TbMedicineExample example);

    int deleteByExample(TbMedicineExample example);

    int deleteByPrimaryKey(Integer medicineId);

    int insert(TbMedicine record);

    int insertSelective(TbMedicine record);

    List<TbMedicine> selectByExample(TbMedicineExample example);

    TbMedicine selectByPrimaryKey(Integer medicineId);

    int updateByExampleSelective(@Param("record") TbMedicine record, @Param("example") TbMedicineExample example);

    int updateByExample(@Param("record") TbMedicine record, @Param("example") TbMedicineExample example);

    int updateByPrimaryKeySelective(TbMedicine record);

    int updateByPrimaryKey(TbMedicine record);

    List<TbMedicine> selectList(@Param("search") String search, @Param("state") int[] state, @Param("minDate") String minDate,
                                     @Param("maxDate") String maxDate, @Param("orderCol") String orderCol,
                                     @Param("orderDir") String orderDir);

    int updateStateByPrimaryKey(@Param("medicineId")Integer id,@Param("state")Integer state);

    List<TbMedicine> selectListByMedicineId(Integer medicineId);

    int updatePriceByPrimaryKey(@Param("medicineId")Integer id,@Param("price")float price);


}